package com.jjsj.mall.listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.connection.MessageListener;

@Slf4j
public class KeyExpirationMessageListener implements MessageListener {

    @Override
    public void onMessage(Message message, byte[] pattern) {
        log.info("监听到键过期消息，消息内容：{}，消息对应的键为：{}", message, new String(pattern));
        // TODO 业务逻辑
    }
}